<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>父级比例</title>
    <style>
        html {
            height: 100%;
        }
        body {
            height: 100%;
        }
        .container {
            width: 50%;
            height: 50%;
            background-color: pink;
        }
    </style>
</head>
<body>
    <div class="container"></div>
</body>
</html>